'use strict'

function abs(x){
  if(x>=0){
     return x;
  }else{
      return -x;
  }
}

console.log(abs(3));
console.log(abs(-10));

var bba=function(a,c){
   if(a>=c){
       return a;
   }else{
       return c;
   }
}

//简单的封装
  var st=(str)=>{
      console.log(str);
  }
  
  st('太阳出来我爬山坡');

console.log(bba(99,77));

var qq=(s)=>{
    console.log(s);

    var q=`
       ---------------
       原来集万千宠爱于一身，
       今后也要分一半与IT。
       --------------

    `;
    console.log(q);
    
}

qq('猪悟能');

function foo(a,b,c,...rest){
    if(arguments.length===2){
        c=b;
        b=null;
    }
    console.log(a);
    console.log(b);
    console.log(c);
    console.log(rest);
}

foo(1,2,3);
foo(99,100);
foo(1,2,3,5,8,81,23);

function aaa(){
    var t=888;
    var y=`百事`;
    var x=`你好,${y}`;
    console.log(x);
   
};
aaa();
